<?php
header("Content-Type:application/json;charset=utf-8");
require("../init.php");
@$pno = $_REQUEST["pno"];
if($pno == null) $pno = 1;

//sql
$sql = " SELECT * FROM dk_book WHERE sold_count !=0 order by sold_count DESC ";
$result = mysqli_query($conn,$sql);
$rows = mysqli_fetch_all($result,1);
$pageSize = 8;
$total = count($rows);
$sql .= "limit "
$output = [
    "pno" => $pno,
    "pageSize" => $pageSize,

];
echo json_encode(mysqli_fetch_all($result, 1));
?>